$(function () {

  $(".choose_search").click(()=>{
    $('.choose_search_bg').css('display','block')
    $('.choose_search_list').css('display','block')
  })
  $(".choose_search_list_result").click((event)=>{
    hideChooseSearch()
    event.stopPropagation();
  })

  $(".choose_search_list_result").click(function () {
    $('.choose_search_type').text($(this).text())
    hideChooseSearch()
  })

  $(".backToHistory").click(()=>{
    history.go(-1)
  })

  $(document).keydown(function(event){
    if(event.keyCode==13){
      window.location.href='./searchResult.html?search='+$('input').val()
    }
  });

  function hideChooseSearch() {
    $('.choose_search_bg').css('display','none')
    $('.choose_search_list').css('display','none')
  }



})

